
<?php
$vars['helper']->response->setTitle( 'Home' );
$vars['helper']->setContainerClass('padded');
$vars['helper']->insertMessage();
?>

<?php
$blocks = $vars['blocks'];
$blockSize = count($blocks);
if($blockSize % 2 == 0){
	// even number, no problem
	$isEven = true;
}else{
	$blockSize--;
	$isEven = false;
}
for($i = 0; $i < $blockSize ;):
	$block1 = $blocks[$i++];
	$block2 = $blocks[$i++];
	?><div class="box-container">
		<?php $block1->insert(); 
		$block2->insert(); ?>
	</div> <?php 
endfor;

if(!$isEven){
	$block = $blocks[$blockSize];
	?><div class="box-container odd">
		<?php $block->insert(); ?>
	</div> <?php 
}

